# 使用轻量 Python 基础镜像
FROM python:3.10-slim-bullseye

WORKDIR /app

# 复制依赖并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 拷贝代码和资源
COPY main.py .
COPY templates ./templates
COPY static ./static

EXPOSE 8000

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]